package org.fujay.langchain4jserver.domain.knowledge.event;

import lombok.Getter;
import org.fujay.langchain4jserver.domain.knowledge.vo.KnowledgeBaseId;
import org.springframework.context.ApplicationEvent;

/**
 * 领域事件：知识库已被删除。 用于触发后续的清理操作，删除向量索引
 */
@Getter
public class KnowledgeBaseDeletedEvent extends ApplicationEvent {

    private final KnowledgeBaseId knowledgeBaseId;
    private final String indexName;

    public KnowledgeBaseDeletedEvent(
            Object source, KnowledgeBaseId knowledgeBaseId, String indexName) {
        super(source);
        this.knowledgeBaseId = knowledgeBaseId;
        this.indexName = indexName;
    }
}
